﻿<UserControl x:Class="WPFSolution.UserControls.LargeDimentionMatrixSolver"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
			 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:WPFSolution.UserControls"
			 mc:Ignorable="d" 
			 MinHeight="300" MinWidth="300" MaxHeight="600" MaxWidth="600" xmlns:my="clr-namespace:WPFSolution.Converters"
			 xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended">
    <UserControl.Resources>
        <my:DoubleToIntegerConverter x:Key="DoubleToIntegerConverter1" />
    </UserControl.Resources>
    <ScrollViewer VerticalScrollBarVisibility="Auto">
        <DockPanel>
            <StackPanel>
                <GroupBox Header="Solvation Options" Name="MatrixOptionsGroupBox">
                    <StackPanel>
                        <Label>Choose Method</Label>
                        <ComboBox SelectedIndex="0" Name="MethodsComboBox">
                            <ListBoxItem Name="YakobiMethodItem">Implicit Yakobi Method</ListBoxItem>
                            <ListBoxItem Name="SimpleMethodItem">Explicit Simple Method</ListBoxItem>
                            <ListBoxItem Name="AdaptiveMethodItem">Explicit Adaptive Method</ListBoxItem>
                        </ComboBox>
                        <Label>Matrix Dimention:</Label>
                        <Slider x:Name="DimsAmountSlider" Minimum="1000" Maximum="10000" SmallChange="1000" Value="3" BorderThickness="1" SelectionStart="50" AutoToolTipPlacement="TopLeft" IsMoveToPointEnabled="True" Interval="1" Orientation="Horizontal" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="False" TickPlacement="BottomRight" TickFrequency="1000"></Slider>
                        <StackPanel Orientation="Horizontal">
                            <Label Content="Dimention" VerticalAlignment="Center"></Label>
                            <TextBox x:Name="DimentionsNumberTextBox" Width="100" Height="Auto" Text="{Binding ElementName=DimsAmountSlider, Converter={StaticResource DoubleToIntegerConverter1}, Path=Value}" IsReadOnly="True" IsEnabled="True" FontSize="28" BorderBrush="{x:Null}" Background="{x:Null}" Focusable="False"></TextBox>
                        </StackPanel>
                        <DockPanel>
                            <DockPanel.ToolTip>
                                Maximum  100000
												Minimum  1000
                            </DockPanel.ToolTip>
                            <Label Width="130">
                                Maximum Iterations
                            </Label>
                            <extToolkit:WatermarkTextBox Height="Auto" Watermark="1000" Name="maximumIterationsTextBox" MaxWidth="150" Width="Auto" LostFocus="MaximumIterationsTextBox_LostFocus" />
                        </DockPanel>
                        <DockPanel>
                            <DockPanel.ToolTip>
                                Maximum 0,01
												Minimum 0,000001
                            </DockPanel.ToolTip>
                            <Label Width="130">
                                Accuracy
                            </Label>
                            <extToolkit:WatermarkTextBox Height="Auto" Watermark="0,001" Name="accuracyTextBox" MaxWidth="150" Width="Auto" LostFocus="AccuracyTextBox_LostFocus" />
                        </DockPanel>
                    </StackPanel>
                </GroupBox>
                <local:AnswerDetails x:Name="AnswerGroupBox"></local:AnswerDetails>
                <GroupBox Name="ProcessStatusGroupBox" Visibility="Collapsed" Header="Process Status">
                    <StackPanel Name="CalculationStackPanel" Grid.Column="1">
                        <Label FontSize="20">Process Status:</Label>
                        <ProgressBar Name="CalculationProgressBar" Height="30" IsIndeterminate="True"></ProgressBar>
                        <TextBlock Name="CalculationStatusTextBlock"></TextBlock>
                    </StackPanel>
                </GroupBox>
                <Button MaxWidth="150" Name="SolveButton" FontSize="18" Click="Button_Click">Solve</Button>
                <Button MaxWidth="150" Visibility="Collapsed" Name="CancelButton" FontSize="18" Click="CancelButton_Click">Cancel</Button>
            </StackPanel>
        </DockPanel>
    </ScrollViewer>
</UserControl>
